From 2ddfe8f316f963c62d2e3d238c6c9de8cd0677eb Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 7 Nov 2005 15:32:04 +0000 Subject: [PATCH] Olaf adds tools to build RPM distribution. --- gpsbabel/AUTHORS | 48 ++++++++++++++++++++ gpsbabel/Makefile | 16 ++++++- gpsbabel/tools/mkchangelog | 6 +-- gpsbabel/tools/mkrpm | 92 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 157 insertions(+), 5 deletions(-) create mode 100644 gpsbabel/AUTHORS create mode 100755 gpsbabel/tools/mkrpm diff --git a/gpsbabel/AUTHORS b/gpsbabel/AUTHORS new file mode 100644 index 000000000..d31b97ca1 --- /dev/null +++ b/gpsbabel/AUTHORS @@ -0,0 +1,48 @@ +Authors, the people behind GPSBabel + +Chief Babel-Head: + +* Robert Lipe + +Major contributors: + +* Alex Mottram +* Olaf Klein +* Ronald L. Parker + +Other contributors and helpers: + +* Alan Bleasby +* Andrew Arensburger +* Andrew Kirmse +* Bernhard Spinnler +* Bruce Thompson +* Chris Jones +* Dave Pawson +* Eric Cloninger +* Etienne TASSE +* Frank Warmerdam +* Fredie Kern +* HSA Systems, Sven Dowideit +* Jason Rust +* Jeremy Atherton +* Jim Bensman +* Jochen Becker +* John Temples +* Josh McKee +* Justin Broughton +* Kjeld Jensen +* Mark Bradley +* Oyvind Kaurstad +* P. Rosen +* Patrick Ohly +* Paul Merchant +* Paul Tomblin +* Richard Messeder +* Rick Richardson +* Robert Shaw +* Scott Brynen +* Steve Chamberlin +* Sven Dovideit +* Tim Zickus +* Tobias Minich diff --git a/gpsbabel/Makefile b/gpsbabel/Makefile index c105e07ea..674bcc295 100644 --- a/gpsbabel/Makefile +++ b/gpsbabel/Makefile @@ -1,5 +1,10 @@ -VERSIONU=1_2_8-beta11062005 -VERSIOND=1.2.8-beta11062005 + +VERSU=1_2_8 +VERSD=1.2.8 +RELEASE=-beta11072005 +VERSIONU=$(VERSU)$(RELEASE) +VERSIOND=$(VERSD)$(RELEASE) + # VERSIONU=1_2_7 # VERSIOND=1.2.7 @@ -148,6 +153,13 @@ release: curl -u anonymous:anonymous --upload-file /tmp/gpsbabel-$(VERSIOND).tar.gz ftp://upload.sf.net/incoming/ curl -u anonymous:anonymous --upload-file /tmp/gpsbabel-$(VERSIOND).zip ftp://upload.sf.net/incoming/ +rpm: clean + tools/mkrpm $(VERSD) $(RELEASE) + +rpmrelease: + curl -u anonymous:anonymous --upload-file /usr/src/redhat/SRPMS/gpsbabel-$(VERSIOND).src.rpm ftp://upload.sf.net/incoming/ + curl -u anonymous:anonymous --upload-file /usr/src/redhat/RPMS/i386/gpsbabel-$(VERSIOND).i386.rpm ftp://upload.sf.net/incoming/ + mac-usbfree: make LIBEXPAT=/sw/lib/libexpat.a EXTRA_CFLAGS="-I/sw/include" LIBUSB= INHIBIT_USB=-DNO_USB diff --git a/gpsbabel/tools/mkchangelog b/gpsbabel/tools/mkchangelog index 6f7c80b0e..9d1a27d40 100755 --- a/gpsbabel/tools/mkchangelog +++ b/gpsbabel/tools/mkchangelog @@ -3,11 +3,11 @@ # creates a RPM compatible ChangeLog file from babelweb/changes.html # (published at http://www.gpsbabel.org) # -# !!! requires changes.html in current directory !!! -# output results to stdout +# !!! input from stdin and output to stdout !!! # -cat changes.html | +LANG='POSIX'; export LANG > /dev/null + sed -e :a -e 's/<[^<]*>/ /g;//g' -e 's/</\> $SPEC +} + +# create spec file needed for rpm generation +function mkspec() +{ + local REL=`echo $RELEASE | sed 's/^-//'` + test "$REL" == "" && REL=0 + + echo -n "" > $SPEC # create the file + + addspec "Summary: GPSBabel" + addspec "Name: gpsbabel" + addspec "Version: $VERSION" + addspec "Release: $REL" + addspec "License: GPL" + addspec "Group: File tools" + addspec "Source: %{name}-%{version}.tar.bz2" + addspec "BuildRoot: %{_tmppath}/%{name}-%{version}-build" + addspec "URL: http://www.gpsbabel.org" + addspec "" + + addspec "%description" + addspec "Converts GPS waypoint, route and track data from one format type to another." + addspec "" + + addspec "Authors:" + addspec "--------" + + cat $DIR/AUTHORS >> gpsbabel.spec + + addspec "" + addspec "%prep" + addspec "%setup -q" + addspec "" + + addspec "%build" + addspec "make" + addspec "" + addspec "%install" + addspec "rm -rf " + addspec "mkdir -p %{buildroot}/usr/bin " + addspec "install -m 555 gpsbabel %{buildroot}/usr/bin/gpsbabel " + addspec "" + + addspec "%files" + addspec "%defattr(-,root,root)" + addspec "/usr/bin/gpsbabel" + addspec "%doc README* COPYING CHANGELOG AUTHORS" + addspec "" + addspec "%changelog" +} + +cd $TEMPDIR + +ln -sf $DIR gpsbabel-$VERSION + +mkspec + +cat ~/src/babelweb/changes.html | $DIR/tools/mkchangelog > gpsbabel-$VERSION/CHANGELOG +cat gpsbabel-$VERSION/CHANGELOG >> gpsbabel.spec + +cp gpsbabel.spec gpsbabel-$VERSION/ +rm -f gpsbabel.spec + +tar -cj $TAR_IGNORE -f gpsbabel-$VERSION.tar.bz2 gpsbabel-$VERSION/. +rm -f gpsbabel-$VERSION + +${RPM} -ta gpsbabel-$VERSION.tar.bz2 + +cd $DIR -- 2.30.2